<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>CSD462 Library Documentation: CSD462::Viewport Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CSD462 Library Documentation
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">15-462/15-662: Computer Graphics (Fall 2015)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>CSD462</b></li><li class="navelem"><a class="el" href="class_c_s_d462_1_1_viewport.html">Viewport</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_c_s_d462_1_1_viewport-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CSD462::Viewport Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Draws buffered image data as texture.  
 <a href="class_c_s_d462_1_1_viewport.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="viewport_8h_source.html">viewport.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a97e246c846936c692bbad909cfefb503"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a97e246c846936c692bbad909cfefb503"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_s_d462_1_1_viewport.html#a97e246c846936c692bbad909cfefb503">Viewport</a> (void)</td></tr>
<tr class="memdesc:a97e246c846936c692bbad909cfefb503"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a97e246c846936c692bbad909cfefb503"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad326daf50eeb2e3e830590ecdf9e8833"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad326daf50eeb2e3e830590ecdf9e8833"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_s_d462_1_1_viewport.html#ad326daf50eeb2e3e830590ecdf9e8833">~Viewport</a> (void)</td></tr>
<tr class="memdesc:ad326daf50eeb2e3e830590ecdf9e8833"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:ad326daf50eeb2e3e830590ecdf9e8833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cc5dbb553cbcb66d044744194064090"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_s_d462_1_1_viewport.html#a4cc5dbb553cbcb66d044744194064090">bind</a> (char *buffer, size_t w, size_t h)</td></tr>
<tr class="memdesc:a4cc5dbb553cbcb66d044744194064090"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind the viewport to a bitmap buffer.  <a href="#a4cc5dbb553cbcb66d044744194064090">More...</a><br /></td></tr>
<tr class="separator:a4cc5dbb553cbcb66d044744194064090"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1b6fb95159cf0051cacb3261fdf9c3e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1b6fb95159cf0051cacb3261fdf9c3e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_s_d462_1_1_viewport.html#aa1b6fb95159cf0051cacb3261fdf9c3e">update</a> (void)</td></tr>
<tr class="memdesc:aa1b6fb95159cf0051cacb3261fdf9c3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the viewport. <br /></td></tr>
<tr class="separator:aa1b6fb95159cf0051cacb3261fdf9c3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Draws buffered image data as texture. </p>
<p>(Requires OpenGL core profile) The viewport currently draws a textured quad that fills up the context, with no respect to aspect ratio, etc. Need to make it respect certain constrains. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4cc5dbb553cbcb66d044744194064090"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CSD462::Viewport::bind </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bind the viewport to a bitmap buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>buffer that holds the bitmap pixels </td></tr>
    <tr><td class="paramname">w</td><td>width of the bitmap </td></tr>
    <tr><td class="paramname">h</td><td>height of the bitmap </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if successful -1 if failed </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>lib/<a class="el" href="viewport_8h_source.html">viewport.h</a></li>
<li>lib/viewport.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Sep 1 2015 14:30:00 for CSD462 Library Documentation by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
